{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 步骤1 导入必要的库"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 步骤2 从以下地址导入数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "path6 = \"./wind.data\"  # wind.data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 步骤3 将数据作存储并且设置前三列为合适的索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Yr_Mo_Dy</th>\n",
       "      <th>RPT</th>\n",
       "      <th>VAL</th>\n",
       "      <th>ROS</th>\n",
       "      <th>KIL</th>\n",
       "      <th>SHA</th>\n",
       "      <th>BIR</th>\n",
       "      <th>DUB</th>\n",
       "      <th>CLA</th>\n",
       "      <th>MUL</th>\n",
       "      <th>CLO</th>\n",
       "      <th>BEL</th>\n",
       "      <th>MAL</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2061-01-01</td>\n",
       "      <td>15.04</td>\n",
       "      <td>14.96</td>\n",
       "      <td>13.17</td>\n",
       "      <td>9.29</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9.87</td>\n",
       "      <td>13.67</td>\n",
       "      <td>10.25</td>\n",
       "      <td>10.83</td>\n",
       "      <td>12.58</td>\n",
       "      <td>18.50</td>\n",
       "      <td>15.04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2061-01-02</td>\n",
       "      <td>14.71</td>\n",
       "      <td>NaN</td>\n",
       "      <td>10.83</td>\n",
       "      <td>6.50</td>\n",
       "      <td>12.62</td>\n",
       "      <td>7.67</td>\n",
       "      <td>11.50</td>\n",
       "      <td>10.04</td>\n",
       "      <td>9.79</td>\n",
       "      <td>9.67</td>\n",
       "      <td>17.54</td>\n",
       "      <td>13.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2061-01-03</td>\n",
       "      <td>18.50</td>\n",
       "      <td>16.88</td>\n",
       "      <td>12.33</td>\n",
       "      <td>10.13</td>\n",
       "      <td>11.17</td>\n",
       "      <td>6.17</td>\n",
       "      <td>11.25</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8.50</td>\n",
       "      <td>7.67</td>\n",
       "      <td>12.75</td>\n",
       "      <td>12.71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2061-01-04</td>\n",
       "      <td>10.58</td>\n",
       "      <td>6.63</td>\n",
       "      <td>11.75</td>\n",
       "      <td>4.58</td>\n",
       "      <td>4.54</td>\n",
       "      <td>2.88</td>\n",
       "      <td>8.63</td>\n",
       "      <td>1.79</td>\n",
       "      <td>5.83</td>\n",
       "      <td>5.88</td>\n",
       "      <td>5.46</td>\n",
       "      <td>10.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2061-01-05</td>\n",
       "      <td>13.33</td>\n",
       "      <td>13.25</td>\n",
       "      <td>11.42</td>\n",
       "      <td>6.17</td>\n",
       "      <td>10.71</td>\n",
       "      <td>8.21</td>\n",
       "      <td>11.92</td>\n",
       "      <td>6.54</td>\n",
       "      <td>10.92</td>\n",
       "      <td>10.34</td>\n",
       "      <td>12.92</td>\n",
       "      <td>11.83</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Yr_Mo_Dy    RPT    VAL    ROS    KIL    SHA   BIR    DUB    CLA    MUL  \\\n",
       "0 2061-01-01  15.04  14.96  13.17   9.29    NaN  9.87  13.67  10.25  10.83   \n",
       "1 2061-01-02  14.71    NaN  10.83   6.50  12.62  7.67  11.50  10.04   9.79   \n",
       "2 2061-01-03  18.50  16.88  12.33  10.13  11.17  6.17  11.25    NaN   8.50   \n",
       "3 2061-01-04  10.58   6.63  11.75   4.58   4.54  2.88   8.63   1.79   5.83   \n",
       "4 2061-01-05  13.33  13.25  11.42   6.17  10.71  8.21  11.92   6.54  10.92   \n",
       "\n",
       "     CLO    BEL    MAL  \n",
       "0  12.58  18.50  15.04  \n",
       "1   9.67  17.54  13.83  \n",
       "2   7.67  12.75  12.71  \n",
       "3   5.88   5.46  10.88  \n",
       "4  10.34  12.92  11.83  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.read_table(path6, sep = \"\\s+\", parse_dates = [[0,1,2]]) \n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 步骤4 2061年？我们真的有这一年的数据？创建一个函数并用它去修复这个bug"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Yr_Mo_Dy</th>\n",
       "      <th>RPT</th>\n",
       "      <th>VAL</th>\n",
       "      <th>ROS</th>\n",
       "      <th>KIL</th>\n",
       "      <th>SHA</th>\n",
       "      <th>BIR</th>\n",
       "      <th>DUB</th>\n",
       "      <th>CLA</th>\n",
       "      <th>MUL</th>\n",
       "      <th>CLO</th>\n",
       "      <th>BEL</th>\n",
       "      <th>MAL</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1961-01-01</td>\n",
       "      <td>15.04</td>\n",
       "      <td>14.96</td>\n",
       "      <td>13.17</td>\n",
       "      <td>9.29</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9.87</td>\n",
       "      <td>13.67</td>\n",
       "      <td>10.25</td>\n",
       "      <td>10.83</td>\n",
       "      <td>12.58</td>\n",
       "      <td>18.50</td>\n",
       "      <td>15.04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1961-01-02</td>\n",
       "      <td>14.71</td>\n",
       "      <td>NaN</td>\n",
       "      <td>10.83</td>\n",
       "      <td>6.50</td>\n",
       "      <td>12.62</td>\n",
       "      <td>7.67</td>\n",
       "      <td>11.50</td>\n",
       "      <td>10.04</td>\n",
       "      <td>9.79</td>\n",
       "      <td>9.67</td>\n",
       "      <td>17.54</td>\n",
       "      <td>13.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1961-01-03</td>\n",
       "      <td>18.50</td>\n",
       "      <td>16.88</td>\n",
       "      <td>12.33</td>\n",
       "      <td>10.13</td>\n",
       "      <td>11.17</td>\n",
       "      <td>6.17</td>\n",
       "      <td>11.25</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8.50</td>\n",
       "      <td>7.67</td>\n",
       "      <td>12.75</td>\n",
       "      <td>12.71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1961-01-04</td>\n",
       "      <td>10.58</td>\n",
       "      <td>6.63</td>\n",
       "      <td>11.75</td>\n",
       "      <td>4.58</td>\n",
       "      <td>4.54</td>\n",
       "      <td>2.88</td>\n",
       "      <td>8.63</td>\n",
       "      <td>1.79</td>\n",
       "      <td>5.83</td>\n",
       "      <td>5.88</td>\n",
       "      <td>5.46</td>\n",
       "      <td>10.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1961-01-05</td>\n",
       "      <td>13.33</td>\n",
       "      <td>13.25</td>\n",
       "      <td>11.42</td>\n",
       "      <td>6.17</td>\n",
       "      <td>10.71</td>\n",
       "      <td>8.21</td>\n",
       "      <td>11.92</td>\n",
       "      <td>6.54</td>\n",
       "      <td>10.92</td>\n",
       "      <td>10.34</td>\n",
       "      <td>12.92</td>\n",
       "      <td>11.83</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Yr_Mo_Dy    RPT    VAL    ROS    KIL    SHA   BIR    DUB    CLA    MUL  \\\n",
       "0  1961-01-01  15.04  14.96  13.17   9.29    NaN  9.87  13.67  10.25  10.83   \n",
       "1  1961-01-02  14.71    NaN  10.83   6.50  12.62  7.67  11.50  10.04   9.79   \n",
       "2  1961-01-03  18.50  16.88  12.33  10.13  11.17  6.17  11.25    NaN   8.50   \n",
       "3  1961-01-04  10.58   6.63  11.75   4.58   4.54  2.88   8.63   1.79   5.83   \n",
       "4  1961-01-05  13.33  13.25  11.42   6.17  10.71  8.21  11.92   6.54  10.92   \n",
       "\n",
       "     CLO    BEL    MAL  \n",
       "0  12.58  18.50  15.04  \n",
       "1   9.67  17.54  13.83  \n",
       "2   7.67  12.75  12.71  \n",
       "3   5.88   5.46  10.88  \n",
       "4  10.34  12.92  11.83  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 运行以下代码\n",
    "def fix_century(x):\n",
    "  year = x.year - 100 if x.year > 1989 else x.year\n",
    "  return datetime.date(year, x.month, x.day)\n",
    "\n",
    "# apply the function fix_century on the column and replace the values to the right ones\n",
    "data['Yr_Mo_Dy'] = data['Yr_Mo_Dy'].apply(fix_century)\n",
    "\n",
    "# data.info()\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 步骤5 将日期设为索引，注意数据类型，应该是```datetime64[ns]```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>RPT</th>\n",
       "      <th>VAL</th>\n",
       "      <th>ROS</th>\n",
       "      <th>KIL</th>\n",
       "      <th>SHA</th>\n",
       "      <th>BIR</th>\n",
       "      <th>DUB</th>\n",
       "      <th>CLA</th>\n",
       "      <th>MUL</th>\n",
       "      <th>CLO</th>\n",
       "      <th>BEL</th>\n",
       "      <th>MAL</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Yr_Mo_Dy</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1961-01-01</th>\n",
       "      <td>15.04</td>\n",
       "      <td>14.96</td>\n",
       "      <td>13.17</td>\n",
       "      <td>9.29</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9.87</td>\n",
       "      <td>13.67</td>\n",
       "      <td>10.25</td>\n",
       "      <td>10.83</td>\n",
       "      <td>12.58</td>\n",
       "      <td>18.50</td>\n",
       "      <td>15.04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1961-01-02</th>\n",
       "      <td>14.71</td>\n",
       "      <td>NaN</td>\n",
       "      <td>10.83</td>\n",
       "      <td>6.50</td>\n",
       "      <td>12.62</td>\n",
       "      <td>7.67</td>\n",
       "      <td>11.50</td>\n",
       "      <td>10.04</td>\n",
       "      <td>9.79</td>\n",
       "      <td>9.67</td>\n",
       "      <td>17.54</td>\n",
       "      <td>13.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1961-01-03</th>\n",
       "      <td>18.50</td>\n",
       "      <td>16.88</td>\n",
       "      <td>12.33</td>\n",
       "      <td>10.13</td>\n",
       "      <td>11.17</td>\n",
       "      <td>6.17</td>\n",
       "      <td>11.25</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8.50</td>\n",
       "      <td>7.67</td>\n",
       "      <td>12.75</td>\n",
       "      <td>12.71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1961-01-04</th>\n",
       "      <td>10.58</td>\n",
       "      <td>6.63</td>\n",
       "      <td>11.75</td>\n",
       "      <td>4.58</td>\n",
       "      <td>4.54</td>\n",
       "      <td>2.88</td>\n",
       "      <td>8.63</td>\n",
       "      <td>1.79</td>\n",
       "      <td>5.83</td>\n",
       "      <td>5.88</td>\n",
       "      <td>5.46</td>\n",
       "      <td>10.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1961-01-05</th>\n",
       "      <td>13.33</td>\n",
       "      <td>13.25</td>\n",
       "      <td>11.42</td>\n",
       "      <td>6.17</td>\n",
       "      <td>10.71</td>\n",
       "      <td>8.21</td>\n",
       "      <td>11.92</td>\n",
       "      <td>6.54</td>\n",
       "      <td>10.92</td>\n",
       "      <td>10.34</td>\n",
       "      <td>12.92</td>\n",
       "      <td>11.83</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              RPT    VAL    ROS    KIL    SHA   BIR    DUB    CLA    MUL  \\\n",
       "Yr_Mo_Dy                                                                   \n",
       "1961-01-01  15.04  14.96  13.17   9.29    NaN  9.87  13.67  10.25  10.83   \n",
       "1961-01-02  14.71    NaN  10.83   6.50  12.62  7.67  11.50  10.04   9.79   \n",
       "1961-01-03  18.50  16.88  12.33  10.13  11.17  6.17  11.25    NaN   8.50   \n",
       "1961-01-04  10.58   6.63  11.75   4.58   4.54  2.88   8.63   1.79   5.83   \n",
       "1961-01-05  13.33  13.25  11.42   6.17  10.71  8.21  11.92   6.54  10.92   \n",
       "\n",
       "              CLO    BEL    MAL  \n",
       "Yr_Mo_Dy                         \n",
       "1961-01-01  12.58  18.50  15.04  \n",
       "1961-01-02   9.67  17.54  13.83  \n",
       "1961-01-03   7.67  12.75  12.71  \n",
       "1961-01-04   5.88   5.46  10.88  \n",
       "1961-01-05  10.34  12.92  11.83  "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# transform Yr_Mo_Dy it to date type datetime64\n",
    "data[\"Yr_Mo_Dy\"] = pd.to_datetime(data[\"Yr_Mo_Dy\"])\n",
    "\n",
    "# set 'Yr_Mo_Dy' as the index\n",
    "data = data.set_index('Yr_Mo_Dy')\n",
    "\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 步骤6 对应每一个location，一共有多少数据值缺失"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RPT    6\n",
       "VAL    3\n",
       "ROS    2\n",
       "KIL    5\n",
       "SHA    2\n",
       "BIR    0\n",
       "DUB    3\n",
       "CLA    2\n",
       "MUL    3\n",
       "CLO    1\n",
       "BEL    0\n",
       "MAL    4\n",
       "dtype: int64"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 步骤7 对应每一个location，一共有多少完整的数据值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RPT     6\n",
       "VAL     9\n",
       "ROS    10\n",
       "KIL     7\n",
       "SHA    10\n",
       "BIR    12\n",
       "DUB     9\n",
       "CLA    10\n",
       "MUL     9\n",
       "CLO    11\n",
       "BEL    12\n",
       "MAL     8\n",
       "dtype: int64"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.shape[1] - data.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 步骤8 对于全体数据，计算风速的平均值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10.227982360836924"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.mean().mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 步骤9 创建一个名为```loc_stats```的数据框去计算并存储每个location的风速最小值，最大值，平均值和标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>max</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>RPT</th>\n",
       "      <td>0.67</td>\n",
       "      <td>35.80</td>\n",
       "      <td>12.362987</td>\n",
       "      <td>5.618413</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>VAL</th>\n",
       "      <td>0.21</td>\n",
       "      <td>33.37</td>\n",
       "      <td>10.644314</td>\n",
       "      <td>5.267356</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ROS</th>\n",
       "      <td>1.50</td>\n",
       "      <td>33.84</td>\n",
       "      <td>11.660526</td>\n",
       "      <td>5.008450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>KIL</th>\n",
       "      <td>0.00</td>\n",
       "      <td>28.46</td>\n",
       "      <td>6.306468</td>\n",
       "      <td>3.605811</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>SHA</th>\n",
       "      <td>0.13</td>\n",
       "      <td>37.54</td>\n",
       "      <td>10.455834</td>\n",
       "      <td>4.936125</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>BIR</th>\n",
       "      <td>0.00</td>\n",
       "      <td>26.16</td>\n",
       "      <td>7.092254</td>\n",
       "      <td>3.968683</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>DUB</th>\n",
       "      <td>0.00</td>\n",
       "      <td>30.37</td>\n",
       "      <td>9.797343</td>\n",
       "      <td>4.977555</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>CLA</th>\n",
       "      <td>0.00</td>\n",
       "      <td>31.08</td>\n",
       "      <td>8.495053</td>\n",
       "      <td>4.499449</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>MUL</th>\n",
       "      <td>0.00</td>\n",
       "      <td>25.88</td>\n",
       "      <td>8.493590</td>\n",
       "      <td>4.166872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>CLO</th>\n",
       "      <td>0.04</td>\n",
       "      <td>28.21</td>\n",
       "      <td>8.707332</td>\n",
       "      <td>4.503954</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>BEL</th>\n",
       "      <td>0.13</td>\n",
       "      <td>42.38</td>\n",
       "      <td>13.121007</td>\n",
       "      <td>5.835037</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>MAL</th>\n",
       "      <td>0.67</td>\n",
       "      <td>42.54</td>\n",
       "      <td>15.599079</td>\n",
       "      <td>6.699794</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      min    max       mean       std\n",
       "RPT  0.67  35.80  12.362987  5.618413\n",
       "VAL  0.21  33.37  10.644314  5.267356\n",
       "ROS  1.50  33.84  11.660526  5.008450\n",
       "KIL  0.00  28.46   6.306468  3.605811\n",
       "SHA  0.13  37.54  10.455834  4.936125\n",
       "BIR  0.00  26.16   7.092254  3.968683\n",
       "DUB  0.00  30.37   9.797343  4.977555\n",
       "CLA  0.00  31.08   8.495053  4.499449\n",
       "MUL  0.00  25.88   8.493590  4.166872\n",
       "CLO  0.04  28.21   8.707332  4.503954\n",
       "BEL  0.13  42.38  13.121007  5.835037\n",
       "MAL  0.67  42.54  15.599079  6.699794"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "loc_stats = pd.DataFrame()\n",
    "\n",
    "loc_stats['min'] = data.min() # min\n",
    "loc_stats['max'] = data.max() # max \n",
    "loc_stats['mean'] = data.mean() # mean\n",
    "loc_stats['std'] = data.std() # standard deviations\n",
    "\n",
    "loc_stats"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 步骤10 创建一个名为```day_stats```的数据框去计算并存储所有location的风速最小值，最大值，平均值和标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>max</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Yr_Mo_Dy</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1961-01-01</th>\n",
       "      <td>9.29</td>\n",
       "      <td>18.50</td>\n",
       "      <td>13.018182</td>\n",
       "      <td>2.808875</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1961-01-02</th>\n",
       "      <td>6.50</td>\n",
       "      <td>17.54</td>\n",
       "      <td>11.336364</td>\n",
       "      <td>3.188994</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1961-01-03</th>\n",
       "      <td>6.17</td>\n",
       "      <td>18.50</td>\n",
       "      <td>11.641818</td>\n",
       "      <td>3.681912</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1961-01-04</th>\n",
       "      <td>1.79</td>\n",
       "      <td>11.75</td>\n",
       "      <td>6.619167</td>\n",
       "      <td>3.198126</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1961-01-05</th>\n",
       "      <td>6.17</td>\n",
       "      <td>13.33</td>\n",
       "      <td>10.630000</td>\n",
       "      <td>2.445356</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             min    max       mean       std\n",
       "Yr_Mo_Dy                                    \n",
       "1961-01-01  9.29  18.50  13.018182  2.808875\n",
       "1961-01-02  6.50  17.54  11.336364  3.188994\n",
       "1961-01-03  6.17  18.50  11.641818  3.681912\n",
       "1961-01-04  1.79  11.75   6.619167  3.198126\n",
       "1961-01-05  6.17  13.33  10.630000  2.445356"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "day_stats = pd.DataFrame()\n",
    "\n",
    "# this time we determine axis equals to one so it gets each row.\n",
    "day_stats['min'] = data.min(axis = 1) # min\n",
    "day_stats['max'] = data.max(axis = 1) # max \n",
    "day_stats['mean'] = data.mean(axis = 1) # mean\n",
    "day_stats['std'] = data.std(axis = 1) # standard deviations\n",
    "\n",
    "day_stats.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 步骤11 对于每一个location，计算各月份的平均风速\n",
    "*注意，不同年份的同一月份（如1961年的1月和1962年的1月）应该区别对待*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>RPT</th>\n",
       "      <th>VAL</th>\n",
       "      <th>ROS</th>\n",
       "      <th>KIL</th>\n",
       "      <th>SHA</th>\n",
       "      <th>BIR</th>\n",
       "      <th>DUB</th>\n",
       "      <th>CLA</th>\n",
       "      <th>MUL</th>\n",
       "      <th>CLO</th>\n",
       "      <th>BEL</th>\n",
       "      <th>MAL</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Yr_Mo_Dy</th>\n",
       "      <th>Yr_Mo_Dy</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">1961</th>\n",
       "      <th>1</th>\n",
       "      <td>14.841333</td>\n",
       "      <td>11.988333</td>\n",
       "      <td>13.431613</td>\n",
       "      <td>7.736774</td>\n",
       "      <td>11.072759</td>\n",
       "      <td>8.588065</td>\n",
       "      <td>11.184839</td>\n",
       "      <td>9.245333</td>\n",
       "      <td>9.085806</td>\n",
       "      <td>10.107419</td>\n",
       "      <td>13.880968</td>\n",
       "      <td>14.703226</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>16.269286</td>\n",
       "      <td>14.975357</td>\n",
       "      <td>14.441481</td>\n",
       "      <td>9.230741</td>\n",
       "      <td>13.852143</td>\n",
       "      <td>10.937500</td>\n",
       "      <td>11.890714</td>\n",
       "      <td>11.846071</td>\n",
       "      <td>11.821429</td>\n",
       "      <td>12.714286</td>\n",
       "      <td>18.583214</td>\n",
       "      <td>15.411786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>10.890000</td>\n",
       "      <td>11.296452</td>\n",
       "      <td>10.752903</td>\n",
       "      <td>7.284000</td>\n",
       "      <td>10.509355</td>\n",
       "      <td>8.866774</td>\n",
       "      <td>9.644194</td>\n",
       "      <td>9.829677</td>\n",
       "      <td>10.294138</td>\n",
       "      <td>11.251935</td>\n",
       "      <td>16.410968</td>\n",
       "      <td>15.720000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>10.722667</td>\n",
       "      <td>9.427667</td>\n",
       "      <td>9.998000</td>\n",
       "      <td>5.830667</td>\n",
       "      <td>8.435000</td>\n",
       "      <td>6.495000</td>\n",
       "      <td>6.925333</td>\n",
       "      <td>7.094667</td>\n",
       "      <td>7.342333</td>\n",
       "      <td>7.237000</td>\n",
       "      <td>11.147333</td>\n",
       "      <td>10.278333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>9.860968</td>\n",
       "      <td>8.850000</td>\n",
       "      <td>10.818065</td>\n",
       "      <td>5.905333</td>\n",
       "      <td>9.490323</td>\n",
       "      <td>6.574839</td>\n",
       "      <td>7.604000</td>\n",
       "      <td>8.177097</td>\n",
       "      <td>8.039355</td>\n",
       "      <td>8.499355</td>\n",
       "      <td>11.900323</td>\n",
       "      <td>12.011613</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>9.904138</td>\n",
       "      <td>8.520333</td>\n",
       "      <td>8.867000</td>\n",
       "      <td>6.083000</td>\n",
       "      <td>10.824000</td>\n",
       "      <td>6.707333</td>\n",
       "      <td>9.095667</td>\n",
       "      <td>8.849333</td>\n",
       "      <td>9.086667</td>\n",
       "      <td>9.940333</td>\n",
       "      <td>13.995000</td>\n",
       "      <td>14.553793</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>10.614194</td>\n",
       "      <td>8.221613</td>\n",
       "      <td>9.110323</td>\n",
       "      <td>6.340968</td>\n",
       "      <td>10.532581</td>\n",
       "      <td>6.198387</td>\n",
       "      <td>8.353333</td>\n",
       "      <td>8.284194</td>\n",
       "      <td>8.077097</td>\n",
       "      <td>8.891613</td>\n",
       "      <td>11.092581</td>\n",
       "      <td>12.312903</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>12.035000</td>\n",
       "      <td>10.133871</td>\n",
       "      <td>10.335806</td>\n",
       "      <td>6.845806</td>\n",
       "      <td>12.715161</td>\n",
       "      <td>8.441935</td>\n",
       "      <td>10.093871</td>\n",
       "      <td>10.460968</td>\n",
       "      <td>9.111613</td>\n",
       "      <td>10.544667</td>\n",
       "      <td>14.410000</td>\n",
       "      <td>14.345333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>12.531000</td>\n",
       "      <td>9.656897</td>\n",
       "      <td>10.776897</td>\n",
       "      <td>7.155517</td>\n",
       "      <td>11.003333</td>\n",
       "      <td>7.234000</td>\n",
       "      <td>8.206000</td>\n",
       "      <td>8.936552</td>\n",
       "      <td>7.728333</td>\n",
       "      <td>9.931333</td>\n",
       "      <td>13.718333</td>\n",
       "      <td>12.921667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>14.289667</td>\n",
       "      <td>10.915806</td>\n",
       "      <td>12.236452</td>\n",
       "      <td>8.154839</td>\n",
       "      <td>11.865484</td>\n",
       "      <td>8.333871</td>\n",
       "      <td>11.194194</td>\n",
       "      <td>9.271935</td>\n",
       "      <td>8.942667</td>\n",
       "      <td>11.455806</td>\n",
       "      <td>14.229355</td>\n",
       "      <td>16.793226</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>10.896333</td>\n",
       "      <td>8.592667</td>\n",
       "      <td>11.850333</td>\n",
       "      <td>6.045667</td>\n",
       "      <td>9.123667</td>\n",
       "      <td>6.250667</td>\n",
       "      <td>10.869655</td>\n",
       "      <td>6.313667</td>\n",
       "      <td>6.575000</td>\n",
       "      <td>8.383667</td>\n",
       "      <td>10.776667</td>\n",
       "      <td>12.146000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>14.973548</td>\n",
       "      <td>11.903871</td>\n",
       "      <td>13.980323</td>\n",
       "      <td>7.073871</td>\n",
       "      <td>11.323548</td>\n",
       "      <td>8.302258</td>\n",
       "      <td>11.753548</td>\n",
       "      <td>8.163226</td>\n",
       "      <td>7.965806</td>\n",
       "      <td>9.246774</td>\n",
       "      <td>12.239355</td>\n",
       "      <td>13.098710</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">1962</th>\n",
       "      <th>1</th>\n",
       "      <td>14.783871</td>\n",
       "      <td>13.160323</td>\n",
       "      <td>12.591935</td>\n",
       "      <td>7.538065</td>\n",
       "      <td>11.779677</td>\n",
       "      <td>8.720000</td>\n",
       "      <td>14.211935</td>\n",
       "      <td>9.600000</td>\n",
       "      <td>9.670000</td>\n",
       "      <td>11.498710</td>\n",
       "      <td>16.369355</td>\n",
       "      <td>15.661613</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>15.844643</td>\n",
       "      <td>12.041429</td>\n",
       "      <td>15.178929</td>\n",
       "      <td>9.262963</td>\n",
       "      <td>13.821429</td>\n",
       "      <td>9.726786</td>\n",
       "      <td>16.916429</td>\n",
       "      <td>11.285357</td>\n",
       "      <td>12.021071</td>\n",
       "      <td>12.126429</td>\n",
       "      <td>16.705357</td>\n",
       "      <td>18.426786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>11.634333</td>\n",
       "      <td>8.602258</td>\n",
       "      <td>12.110645</td>\n",
       "      <td>6.403226</td>\n",
       "      <td>10.352258</td>\n",
       "      <td>6.732258</td>\n",
       "      <td>10.223226</td>\n",
       "      <td>7.641935</td>\n",
       "      <td>7.092258</td>\n",
       "      <td>8.052581</td>\n",
       "      <td>9.690000</td>\n",
       "      <td>11.509000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>12.160667</td>\n",
       "      <td>9.676667</td>\n",
       "      <td>12.088333</td>\n",
       "      <td>7.163000</td>\n",
       "      <td>10.544000</td>\n",
       "      <td>7.558000</td>\n",
       "      <td>11.480000</td>\n",
       "      <td>8.722000</td>\n",
       "      <td>8.703667</td>\n",
       "      <td>9.311667</td>\n",
       "      <td>12.234333</td>\n",
       "      <td>11.780667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>12.745806</td>\n",
       "      <td>10.865484</td>\n",
       "      <td>11.874839</td>\n",
       "      <td>7.471935</td>\n",
       "      <td>11.285806</td>\n",
       "      <td>7.209032</td>\n",
       "      <td>10.105806</td>\n",
       "      <td>9.084516</td>\n",
       "      <td>7.868065</td>\n",
       "      <td>9.293226</td>\n",
       "      <td>12.130000</td>\n",
       "      <td>12.922581</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>10.305667</td>\n",
       "      <td>9.677000</td>\n",
       "      <td>9.996333</td>\n",
       "      <td>6.846667</td>\n",
       "      <td>10.711333</td>\n",
       "      <td>7.441333</td>\n",
       "      <td>10.548667</td>\n",
       "      <td>10.306667</td>\n",
       "      <td>9.196000</td>\n",
       "      <td>10.520333</td>\n",
       "      <td>13.757000</td>\n",
       "      <td>15.218333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>9.981935</td>\n",
       "      <td>8.370645</td>\n",
       "      <td>9.753548</td>\n",
       "      <td>6.093226</td>\n",
       "      <td>9.112903</td>\n",
       "      <td>5.877097</td>\n",
       "      <td>7.781613</td>\n",
       "      <td>8.123226</td>\n",
       "      <td>6.829677</td>\n",
       "      <td>8.613226</td>\n",
       "      <td>10.783871</td>\n",
       "      <td>11.326129</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>10.964194</td>\n",
       "      <td>9.694194</td>\n",
       "      <td>10.184516</td>\n",
       "      <td>6.701290</td>\n",
       "      <td>10.465161</td>\n",
       "      <td>7.009032</td>\n",
       "      <td>11.136774</td>\n",
       "      <td>9.097419</td>\n",
       "      <td>8.645484</td>\n",
       "      <td>9.511613</td>\n",
       "      <td>13.119032</td>\n",
       "      <td>15.420968</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>11.176333</td>\n",
       "      <td>9.507000</td>\n",
       "      <td>11.640000</td>\n",
       "      <td>6.164333</td>\n",
       "      <td>9.722333</td>\n",
       "      <td>6.214000</td>\n",
       "      <td>8.488000</td>\n",
       "      <td>7.020333</td>\n",
       "      <td>6.372667</td>\n",
       "      <td>8.286000</td>\n",
       "      <td>11.483667</td>\n",
       "      <td>12.313333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>9.699355</td>\n",
       "      <td>8.063548</td>\n",
       "      <td>9.357097</td>\n",
       "      <td>4.818065</td>\n",
       "      <td>8.432258</td>\n",
       "      <td>5.730000</td>\n",
       "      <td>8.448065</td>\n",
       "      <td>7.626774</td>\n",
       "      <td>6.630645</td>\n",
       "      <td>9.091290</td>\n",
       "      <td>13.286774</td>\n",
       "      <td>14.090323</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>11.071333</td>\n",
       "      <td>7.984000</td>\n",
       "      <td>12.035667</td>\n",
       "      <td>5.740000</td>\n",
       "      <td>8.135667</td>\n",
       "      <td>6.338333</td>\n",
       "      <td>9.615333</td>\n",
       "      <td>5.943000</td>\n",
       "      <td>6.362333</td>\n",
       "      <td>8.084333</td>\n",
       "      <td>9.786667</td>\n",
       "      <td>13.298333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>16.785484</td>\n",
       "      <td>13.753548</td>\n",
       "      <td>14.276452</td>\n",
       "      <td>9.557419</td>\n",
       "      <td>13.724839</td>\n",
       "      <td>10.321613</td>\n",
       "      <td>13.735806</td>\n",
       "      <td>11.212258</td>\n",
       "      <td>10.683548</td>\n",
       "      <td>11.881935</td>\n",
       "      <td>16.043548</td>\n",
       "      <td>20.074516</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"6\" valign=\"top\">1963</th>\n",
       "      <th>1</th>\n",
       "      <td>14.868387</td>\n",
       "      <td>11.112903</td>\n",
       "      <td>15.121613</td>\n",
       "      <td>6.635806</td>\n",
       "      <td>11.080645</td>\n",
       "      <td>7.835484</td>\n",
       "      <td>12.797419</td>\n",
       "      <td>9.844839</td>\n",
       "      <td>7.841613</td>\n",
       "      <td>9.390000</td>\n",
       "      <td>11.428710</td>\n",
       "      <td>18.822258</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>14.418929</td>\n",
       "      <td>11.876429</td>\n",
       "      <td>15.697500</td>\n",
       "      <td>8.611786</td>\n",
       "      <td>12.887857</td>\n",
       "      <td>9.600357</td>\n",
       "      <td>12.729286</td>\n",
       "      <td>10.823214</td>\n",
       "      <td>8.981786</td>\n",
       "      <td>10.355714</td>\n",
       "      <td>13.266429</td>\n",
       "      <td>17.120714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>14.853871</td>\n",
       "      <td>12.271290</td>\n",
       "      <td>14.295806</td>\n",
       "      <td>9.268387</td>\n",
       "      <td>13.112903</td>\n",
       "      <td>10.088065</td>\n",
       "      <td>12.168387</td>\n",
       "      <td>11.340968</td>\n",
       "      <td>9.690968</td>\n",
       "      <td>11.515484</td>\n",
       "      <td>13.982903</td>\n",
       "      <td>14.132581</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>11.616000</td>\n",
       "      <td>10.138000</td>\n",
       "      <td>13.233667</td>\n",
       "      <td>7.990333</td>\n",
       "      <td>11.515333</td>\n",
       "      <td>9.727000</td>\n",
       "      <td>11.979000</td>\n",
       "      <td>11.353000</td>\n",
       "      <td>10.341667</td>\n",
       "      <td>11.900333</td>\n",
       "      <td>13.875667</td>\n",
       "      <td>16.333667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>12.879677</td>\n",
       "      <td>11.010645</td>\n",
       "      <td>12.881290</td>\n",
       "      <td>8.411613</td>\n",
       "      <td>12.981613</td>\n",
       "      <td>9.739677</td>\n",
       "      <td>12.280968</td>\n",
       "      <td>10.964194</td>\n",
       "      <td>10.745161</td>\n",
       "      <td>11.394839</td>\n",
       "      <td>14.777097</td>\n",
       "      <td>14.975161</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>10.623333</td>\n",
       "      <td>8.434667</td>\n",
       "      <td>11.685000</td>\n",
       "      <td>6.420333</td>\n",
       "      <td>10.142667</td>\n",
       "      <td>7.219333</td>\n",
       "      <td>9.267333</td>\n",
       "      <td>9.589333</td>\n",
       "      <td>8.583667</td>\n",
       "      <td>9.585333</td>\n",
       "      <td>12.098000</td>\n",
       "      <td>11.358667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"6\" valign=\"top\">1976</th>\n",
       "      <th>7</th>\n",
       "      <td>9.687742</td>\n",
       "      <td>7.980968</td>\n",
       "      <td>8.267742</td>\n",
       "      <td>4.631613</td>\n",
       "      <td>7.576774</td>\n",
       "      <td>4.927419</td>\n",
       "      <td>6.994839</td>\n",
       "      <td>5.135806</td>\n",
       "      <td>7.941290</td>\n",
       "      <td>6.491290</td>\n",
       "      <td>10.264194</td>\n",
       "      <td>11.912258</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>7.640645</td>\n",
       "      <td>5.366129</td>\n",
       "      <td>9.000645</td>\n",
       "      <td>3.142258</td>\n",
       "      <td>4.695484</td>\n",
       "      <td>3.847742</td>\n",
       "      <td>5.437097</td>\n",
       "      <td>3.362581</td>\n",
       "      <td>5.946452</td>\n",
       "      <td>4.496452</td>\n",
       "      <td>7.079677</td>\n",
       "      <td>9.438387</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>11.703667</td>\n",
       "      <td>10.515333</td>\n",
       "      <td>10.466333</td>\n",
       "      <td>5.313333</td>\n",
       "      <td>8.761333</td>\n",
       "      <td>7.062333</td>\n",
       "      <td>8.617667</td>\n",
       "      <td>6.415333</td>\n",
       "      <td>8.953333</td>\n",
       "      <td>7.263333</td>\n",
       "      <td>11.587000</td>\n",
       "      <td>17.634000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>12.427097</td>\n",
       "      <td>9.572258</td>\n",
       "      <td>10.640000</td>\n",
       "      <td>4.885484</td>\n",
       "      <td>9.393548</td>\n",
       "      <td>6.906452</td>\n",
       "      <td>6.380323</td>\n",
       "      <td>6.933226</td>\n",
       "      <td>7.552258</td>\n",
       "      <td>7.449032</td>\n",
       "      <td>11.837742</td>\n",
       "      <td>15.078065</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>10.962667</td>\n",
       "      <td>9.443667</td>\n",
       "      <td>9.202000</td>\n",
       "      <td>3.696000</td>\n",
       "      <td>7.459333</td>\n",
       "      <td>7.026333</td>\n",
       "      <td>9.058333</td>\n",
       "      <td>5.791000</td>\n",
       "      <td>6.577000</td>\n",
       "      <td>7.512333</td>\n",
       "      <td>12.568333</td>\n",
       "      <td>15.685333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>11.962258</td>\n",
       "      <td>10.086774</td>\n",
       "      <td>10.474516</td>\n",
       "      <td>3.383871</td>\n",
       "      <td>7.645484</td>\n",
       "      <td>6.148387</td>\n",
       "      <td>8.034516</td>\n",
       "      <td>4.500000</td>\n",
       "      <td>5.952258</td>\n",
       "      <td>6.147742</td>\n",
       "      <td>7.814839</td>\n",
       "      <td>14.346774</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">1977</th>\n",
       "      <th>1</th>\n",
       "      <td>13.404516</td>\n",
       "      <td>10.377742</td>\n",
       "      <td>12.764839</td>\n",
       "      <td>5.884516</td>\n",
       "      <td>9.159677</td>\n",
       "      <td>8.005161</td>\n",
       "      <td>10.107419</td>\n",
       "      <td>7.211613</td>\n",
       "      <td>8.280000</td>\n",
       "      <td>9.328387</td>\n",
       "      <td>12.131935</td>\n",
       "      <td>18.830000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>12.336786</td>\n",
       "      <td>11.898929</td>\n",
       "      <td>12.016786</td>\n",
       "      <td>5.317500</td>\n",
       "      <td>10.134643</td>\n",
       "      <td>9.423929</td>\n",
       "      <td>10.949643</td>\n",
       "      <td>7.965357</td>\n",
       "      <td>9.320000</td>\n",
       "      <td>8.711429</td>\n",
       "      <td>11.435357</td>\n",
       "      <td>17.561429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>16.750000</td>\n",
       "      <td>14.499677</td>\n",
       "      <td>16.118387</td>\n",
       "      <td>8.414516</td>\n",
       "      <td>13.293871</td>\n",
       "      <td>11.562258</td>\n",
       "      <td>14.283226</td>\n",
       "      <td>11.361613</td>\n",
       "      <td>12.102581</td>\n",
       "      <td>11.906452</td>\n",
       "      <td>15.863226</td>\n",
       "      <td>19.133548</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>14.955333</td>\n",
       "      <td>12.293000</td>\n",
       "      <td>12.689667</td>\n",
       "      <td>7.422333</td>\n",
       "      <td>11.740000</td>\n",
       "      <td>10.137000</td>\n",
       "      <td>13.887667</td>\n",
       "      <td>9.574000</td>\n",
       "      <td>10.342333</td>\n",
       "      <td>11.419667</td>\n",
       "      <td>15.593667</td>\n",
       "      <td>18.274667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>9.441290</td>\n",
       "      <td>7.173871</td>\n",
       "      <td>12.455806</td>\n",
       "      <td>4.507742</td>\n",
       "      <td>6.198387</td>\n",
       "      <td>6.689677</td>\n",
       "      <td>9.226452</td>\n",
       "      <td>5.638387</td>\n",
       "      <td>6.699355</td>\n",
       "      <td>6.045484</td>\n",
       "      <td>10.213548</td>\n",
       "      <td>11.936129</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>11.040000</td>\n",
       "      <td>8.353000</td>\n",
       "      <td>12.228000</td>\n",
       "      <td>4.864000</td>\n",
       "      <td>8.790333</td>\n",
       "      <td>7.209667</td>\n",
       "      <td>8.799667</td>\n",
       "      <td>5.931000</td>\n",
       "      <td>7.065333</td>\n",
       "      <td>6.583333</td>\n",
       "      <td>11.321333</td>\n",
       "      <td>11.175333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>10.881935</td>\n",
       "      <td>8.663548</td>\n",
       "      <td>10.816452</td>\n",
       "      <td>5.419677</td>\n",
       "      <td>9.014839</td>\n",
       "      <td>7.600000</td>\n",
       "      <td>9.961935</td>\n",
       "      <td>6.526129</td>\n",
       "      <td>7.980968</td>\n",
       "      <td>7.620000</td>\n",
       "      <td>12.924194</td>\n",
       "      <td>12.186774</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9.233548</td>\n",
       "      <td>7.727742</td>\n",
       "      <td>10.679032</td>\n",
       "      <td>4.453871</td>\n",
       "      <td>6.620645</td>\n",
       "      <td>5.961290</td>\n",
       "      <td>8.943548</td>\n",
       "      <td>4.543226</td>\n",
       "      <td>6.384839</td>\n",
       "      <td>5.694839</td>\n",
       "      <td>9.825161</td>\n",
       "      <td>11.659355</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>12.472333</td>\n",
       "      <td>10.742667</td>\n",
       "      <td>11.849333</td>\n",
       "      <td>5.638667</td>\n",
       "      <td>10.077333</td>\n",
       "      <td>8.242667</td>\n",
       "      <td>11.939333</td>\n",
       "      <td>7.923000</td>\n",
       "      <td>8.828000</td>\n",
       "      <td>8.506333</td>\n",
       "      <td>14.051000</td>\n",
       "      <td>17.030333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>15.004516</td>\n",
       "      <td>13.960000</td>\n",
       "      <td>12.819677</td>\n",
       "      <td>6.754194</td>\n",
       "      <td>11.779032</td>\n",
       "      <td>9.671613</td>\n",
       "      <td>12.924839</td>\n",
       "      <td>11.875161</td>\n",
       "      <td>11.481290</td>\n",
       "      <td>10.340323</td>\n",
       "      <td>17.640968</td>\n",
       "      <td>19.842903</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>16.946667</td>\n",
       "      <td>15.444667</td>\n",
       "      <td>13.561333</td>\n",
       "      <td>7.584000</td>\n",
       "      <td>12.088667</td>\n",
       "      <td>9.161333</td>\n",
       "      <td>14.051000</td>\n",
       "      <td>11.286000</td>\n",
       "      <td>10.318667</td>\n",
       "      <td>10.327000</td>\n",
       "      <td>17.215333</td>\n",
       "      <td>22.333000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>14.751935</td>\n",
       "      <td>12.744839</td>\n",
       "      <td>13.469677</td>\n",
       "      <td>6.592258</td>\n",
       "      <td>11.247742</td>\n",
       "      <td>9.466774</td>\n",
       "      <td>13.231613</td>\n",
       "      <td>10.703871</td>\n",
       "      <td>10.401613</td>\n",
       "      <td>9.415484</td>\n",
       "      <td>13.237419</td>\n",
       "      <td>19.299677</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">1978</th>\n",
       "      <th>1</th>\n",
       "      <td>14.291935</td>\n",
       "      <td>11.872258</td>\n",
       "      <td>12.014194</td>\n",
       "      <td>6.463226</td>\n",
       "      <td>11.402903</td>\n",
       "      <td>7.517097</td>\n",
       "      <td>12.207097</td>\n",
       "      <td>10.206452</td>\n",
       "      <td>9.549032</td>\n",
       "      <td>9.247419</td>\n",
       "      <td>15.101613</td>\n",
       "      <td>20.715806</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>14.143571</td>\n",
       "      <td>12.153214</td>\n",
       "      <td>13.803214</td>\n",
       "      <td>6.828929</td>\n",
       "      <td>11.196786</td>\n",
       "      <td>7.858929</td>\n",
       "      <td>11.903214</td>\n",
       "      <td>11.068929</td>\n",
       "      <td>10.052143</td>\n",
       "      <td>8.093929</td>\n",
       "      <td>10.353929</td>\n",
       "      <td>17.298571</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>14.717097</td>\n",
       "      <td>14.601935</td>\n",
       "      <td>13.334194</td>\n",
       "      <td>8.231290</td>\n",
       "      <td>12.783226</td>\n",
       "      <td>9.488710</td>\n",
       "      <td>12.129355</td>\n",
       "      <td>11.665161</td>\n",
       "      <td>11.656452</td>\n",
       "      <td>9.657097</td>\n",
       "      <td>14.234194</td>\n",
       "      <td>18.611290</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>11.805000</td>\n",
       "      <td>11.255667</td>\n",
       "      <td>12.516333</td>\n",
       "      <td>5.920333</td>\n",
       "      <td>10.218000</td>\n",
       "      <td>7.301667</td>\n",
       "      <td>8.586333</td>\n",
       "      <td>8.306667</td>\n",
       "      <td>8.537000</td>\n",
       "      <td>6.999000</td>\n",
       "      <td>11.190667</td>\n",
       "      <td>14.152000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>8.270645</td>\n",
       "      <td>7.226774</td>\n",
       "      <td>6.901613</td>\n",
       "      <td>3.740645</td>\n",
       "      <td>6.973871</td>\n",
       "      <td>4.449677</td>\n",
       "      <td>5.420968</td>\n",
       "      <td>6.130645</td>\n",
       "      <td>5.742581</td>\n",
       "      <td>5.926452</td>\n",
       "      <td>9.263548</td>\n",
       "      <td>10.756452</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>11.386667</td>\n",
       "      <td>9.474333</td>\n",
       "      <td>10.253333</td>\n",
       "      <td>6.053000</td>\n",
       "      <td>10.395333</td>\n",
       "      <td>7.490333</td>\n",
       "      <td>7.928000</td>\n",
       "      <td>7.802000</td>\n",
       "      <td>8.220333</td>\n",
       "      <td>7.550000</td>\n",
       "      <td>11.501000</td>\n",
       "      <td>15.078667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>12.820000</td>\n",
       "      <td>9.750968</td>\n",
       "      <td>9.910323</td>\n",
       "      <td>6.483871</td>\n",
       "      <td>10.055161</td>\n",
       "      <td>7.820645</td>\n",
       "      <td>7.831935</td>\n",
       "      <td>8.459355</td>\n",
       "      <td>8.523871</td>\n",
       "      <td>7.732903</td>\n",
       "      <td>12.648710</td>\n",
       "      <td>14.077419</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9.645161</td>\n",
       "      <td>8.259355</td>\n",
       "      <td>9.032258</td>\n",
       "      <td>4.502903</td>\n",
       "      <td>7.368065</td>\n",
       "      <td>5.935161</td>\n",
       "      <td>5.650323</td>\n",
       "      <td>5.417742</td>\n",
       "      <td>7.241290</td>\n",
       "      <td>5.536774</td>\n",
       "      <td>10.466774</td>\n",
       "      <td>12.054194</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10.913667</td>\n",
       "      <td>10.895000</td>\n",
       "      <td>10.635000</td>\n",
       "      <td>5.725000</td>\n",
       "      <td>10.372000</td>\n",
       "      <td>9.278333</td>\n",
       "      <td>10.790333</td>\n",
       "      <td>9.583000</td>\n",
       "      <td>10.069333</td>\n",
       "      <td>8.939000</td>\n",
       "      <td>15.680333</td>\n",
       "      <td>19.391333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>9.897742</td>\n",
       "      <td>8.670968</td>\n",
       "      <td>9.295806</td>\n",
       "      <td>4.721290</td>\n",
       "      <td>8.525161</td>\n",
       "      <td>6.774194</td>\n",
       "      <td>8.115484</td>\n",
       "      <td>7.337742</td>\n",
       "      <td>8.297742</td>\n",
       "      <td>8.243871</td>\n",
       "      <td>13.776774</td>\n",
       "      <td>17.150000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>16.151667</td>\n",
       "      <td>14.802667</td>\n",
       "      <td>13.508000</td>\n",
       "      <td>7.317333</td>\n",
       "      <td>11.475000</td>\n",
       "      <td>8.743000</td>\n",
       "      <td>11.492333</td>\n",
       "      <td>9.657333</td>\n",
       "      <td>10.701333</td>\n",
       "      <td>10.676000</td>\n",
       "      <td>17.404667</td>\n",
       "      <td>20.723000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>16.175484</td>\n",
       "      <td>13.748065</td>\n",
       "      <td>15.635161</td>\n",
       "      <td>7.094839</td>\n",
       "      <td>11.398710</td>\n",
       "      <td>9.241613</td>\n",
       "      <td>12.077419</td>\n",
       "      <td>10.194839</td>\n",
       "      <td>10.616774</td>\n",
       "      <td>11.028710</td>\n",
       "      <td>13.859677</td>\n",
       "      <td>21.371613</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>216 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                         RPT        VAL        ROS       KIL        SHA  \\\n",
       "Yr_Mo_Dy Yr_Mo_Dy                                                         \n",
       "1961     1         14.841333  11.988333  13.431613  7.736774  11.072759   \n",
       "         2         16.269286  14.975357  14.441481  9.230741  13.852143   \n",
       "         3         10.890000  11.296452  10.752903  7.284000  10.509355   \n",
       "         4         10.722667   9.427667   9.998000  5.830667   8.435000   \n",
       "         5          9.860968   8.850000  10.818065  5.905333   9.490323   \n",
       "         6          9.904138   8.520333   8.867000  6.083000  10.824000   \n",
       "         7         10.614194   8.221613   9.110323  6.340968  10.532581   \n",
       "         8         12.035000  10.133871  10.335806  6.845806  12.715161   \n",
       "         9         12.531000   9.656897  10.776897  7.155517  11.003333   \n",
       "         10        14.289667  10.915806  12.236452  8.154839  11.865484   \n",
       "         11        10.896333   8.592667  11.850333  6.045667   9.123667   \n",
       "         12        14.973548  11.903871  13.980323  7.073871  11.323548   \n",
       "1962     1         14.783871  13.160323  12.591935  7.538065  11.779677   \n",
       "         2         15.844643  12.041429  15.178929  9.262963  13.821429   \n",
       "         3         11.634333   8.602258  12.110645  6.403226  10.352258   \n",
       "         4         12.160667   9.676667  12.088333  7.163000  10.544000   \n",
       "         5         12.745806  10.865484  11.874839  7.471935  11.285806   \n",
       "         6         10.305667   9.677000   9.996333  6.846667  10.711333   \n",
       "         7          9.981935   8.370645   9.753548  6.093226   9.112903   \n",
       "         8         10.964194   9.694194  10.184516  6.701290  10.465161   \n",
       "         9         11.176333   9.507000  11.640000  6.164333   9.722333   \n",
       "         10         9.699355   8.063548   9.357097  4.818065   8.432258   \n",
       "         11        11.071333   7.984000  12.035667  5.740000   8.135667   \n",
       "         12        16.785484  13.753548  14.276452  9.557419  13.724839   \n",
       "1963     1         14.868387  11.112903  15.121613  6.635806  11.080645   \n",
       "         2         14.418929  11.876429  15.697500  8.611786  12.887857   \n",
       "         3         14.853871  12.271290  14.295806  9.268387  13.112903   \n",
       "         4         11.616000  10.138000  13.233667  7.990333  11.515333   \n",
       "         5         12.879677  11.010645  12.881290  8.411613  12.981613   \n",
       "         6         10.623333   8.434667  11.685000  6.420333  10.142667   \n",
       "...                      ...        ...        ...       ...        ...   \n",
       "1976     7          9.687742   7.980968   8.267742  4.631613   7.576774   \n",
       "         8          7.640645   5.366129   9.000645  3.142258   4.695484   \n",
       "         9         11.703667  10.515333  10.466333  5.313333   8.761333   \n",
       "         10        12.427097   9.572258  10.640000  4.885484   9.393548   \n",
       "         11        10.962667   9.443667   9.202000  3.696000   7.459333   \n",
       "         12        11.962258  10.086774  10.474516  3.383871   7.645484   \n",
       "1977     1         13.404516  10.377742  12.764839  5.884516   9.159677   \n",
       "         2         12.336786  11.898929  12.016786  5.317500  10.134643   \n",
       "         3         16.750000  14.499677  16.118387  8.414516  13.293871   \n",
       "         4         14.955333  12.293000  12.689667  7.422333  11.740000   \n",
       "         5          9.441290   7.173871  12.455806  4.507742   6.198387   \n",
       "         6         11.040000   8.353000  12.228000  4.864000   8.790333   \n",
       "         7         10.881935   8.663548  10.816452  5.419677   9.014839   \n",
       "         8          9.233548   7.727742  10.679032  4.453871   6.620645   \n",
       "         9         12.472333  10.742667  11.849333  5.638667  10.077333   \n",
       "         10        15.004516  13.960000  12.819677  6.754194  11.779032   \n",
       "         11        16.946667  15.444667  13.561333  7.584000  12.088667   \n",
       "         12        14.751935  12.744839  13.469677  6.592258  11.247742   \n",
       "1978     1         14.291935  11.872258  12.014194  6.463226  11.402903   \n",
       "         2         14.143571  12.153214  13.803214  6.828929  11.196786   \n",
       "         3         14.717097  14.601935  13.334194  8.231290  12.783226   \n",
       "         4         11.805000  11.255667  12.516333  5.920333  10.218000   \n",
       "         5          8.270645   7.226774   6.901613  3.740645   6.973871   \n",
       "         6         11.386667   9.474333  10.253333  6.053000  10.395333   \n",
       "         7         12.820000   9.750968   9.910323  6.483871  10.055161   \n",
       "         8          9.645161   8.259355   9.032258  4.502903   7.368065   \n",
       "         9         10.913667  10.895000  10.635000  5.725000  10.372000   \n",
       "         10         9.897742   8.670968   9.295806  4.721290   8.525161   \n",
       "         11        16.151667  14.802667  13.508000  7.317333  11.475000   \n",
       "         12        16.175484  13.748065  15.635161  7.094839  11.398710   \n",
       "\n",
       "                         BIR        DUB        CLA        MUL        CLO  \\\n",
       "Yr_Mo_Dy Yr_Mo_Dy                                                          \n",
       "1961     1          8.588065  11.184839   9.245333   9.085806  10.107419   \n",
       "         2         10.937500  11.890714  11.846071  11.821429  12.714286   \n",
       "         3          8.866774   9.644194   9.829677  10.294138  11.251935   \n",
       "         4          6.495000   6.925333   7.094667   7.342333   7.237000   \n",
       "         5          6.574839   7.604000   8.177097   8.039355   8.499355   \n",
       "         6          6.707333   9.095667   8.849333   9.086667   9.940333   \n",
       "         7          6.198387   8.353333   8.284194   8.077097   8.891613   \n",
       "         8          8.441935  10.093871  10.460968   9.111613  10.544667   \n",
       "         9          7.234000   8.206000   8.936552   7.728333   9.931333   \n",
       "         10         8.333871  11.194194   9.271935   8.942667  11.455806   \n",
       "         11         6.250667  10.869655   6.313667   6.575000   8.383667   \n",
       "         12         8.302258  11.753548   8.163226   7.965806   9.246774   \n",
       "1962     1          8.720000  14.211935   9.600000   9.670000  11.498710   \n",
       "         2          9.726786  16.916429  11.285357  12.021071  12.126429   \n",
       "         3          6.732258  10.223226   7.641935   7.092258   8.052581   \n",
       "         4          7.558000  11.480000   8.722000   8.703667   9.311667   \n",
       "         5          7.209032  10.105806   9.084516   7.868065   9.293226   \n",
       "         6          7.441333  10.548667  10.306667   9.196000  10.520333   \n",
       "         7          5.877097   7.781613   8.123226   6.829677   8.613226   \n",
       "         8          7.009032  11.136774   9.097419   8.645484   9.511613   \n",
       "         9          6.214000   8.488000   7.020333   6.372667   8.286000   \n",
       "         10         5.730000   8.448065   7.626774   6.630645   9.091290   \n",
       "         11         6.338333   9.615333   5.943000   6.362333   8.084333   \n",
       "         12        10.321613  13.735806  11.212258  10.683548  11.881935   \n",
       "1963     1          7.835484  12.797419   9.844839   7.841613   9.390000   \n",
       "         2          9.600357  12.729286  10.823214   8.981786  10.355714   \n",
       "         3         10.088065  12.168387  11.340968   9.690968  11.515484   \n",
       "         4          9.727000  11.979000  11.353000  10.341667  11.900333   \n",
       "         5          9.739677  12.280968  10.964194  10.745161  11.394839   \n",
       "         6          7.219333   9.267333   9.589333   8.583667   9.585333   \n",
       "...                      ...        ...        ...        ...        ...   \n",
       "1976     7          4.927419   6.994839   5.135806   7.941290   6.491290   \n",
       "         8          3.847742   5.437097   3.362581   5.946452   4.496452   \n",
       "         9          7.062333   8.617667   6.415333   8.953333   7.263333   \n",
       "         10         6.906452   6.380323   6.933226   7.552258   7.449032   \n",
       "         11         7.026333   9.058333   5.791000   6.577000   7.512333   \n",
       "         12         6.148387   8.034516   4.500000   5.952258   6.147742   \n",
       "1977     1          8.005161  10.107419   7.211613   8.280000   9.328387   \n",
       "         2          9.423929  10.949643   7.965357   9.320000   8.711429   \n",
       "         3         11.562258  14.283226  11.361613  12.102581  11.906452   \n",
       "         4         10.137000  13.887667   9.574000  10.342333  11.419667   \n",
       "         5          6.689677   9.226452   5.638387   6.699355   6.045484   \n",
       "         6          7.209667   8.799667   5.931000   7.065333   6.583333   \n",
       "         7          7.600000   9.961935   6.526129   7.980968   7.620000   \n",
       "         8          5.961290   8.943548   4.543226   6.384839   5.694839   \n",
       "         9          8.242667  11.939333   7.923000   8.828000   8.506333   \n",
       "         10         9.671613  12.924839  11.875161  11.481290  10.340323   \n",
       "         11         9.161333  14.051000  11.286000  10.318667  10.327000   \n",
       "         12         9.466774  13.231613  10.703871  10.401613   9.415484   \n",
       "1978     1          7.517097  12.207097  10.206452   9.549032   9.247419   \n",
       "         2          7.858929  11.903214  11.068929  10.052143   8.093929   \n",
       "         3          9.488710  12.129355  11.665161  11.656452   9.657097   \n",
       "         4          7.301667   8.586333   8.306667   8.537000   6.999000   \n",
       "         5          4.449677   5.420968   6.130645   5.742581   5.926452   \n",
       "         6          7.490333   7.928000   7.802000   8.220333   7.550000   \n",
       "         7          7.820645   7.831935   8.459355   8.523871   7.732903   \n",
       "         8          5.935161   5.650323   5.417742   7.241290   5.536774   \n",
       "         9          9.278333  10.790333   9.583000  10.069333   8.939000   \n",
       "         10         6.774194   8.115484   7.337742   8.297742   8.243871   \n",
       "         11         8.743000  11.492333   9.657333  10.701333  10.676000   \n",
       "         12         9.241613  12.077419  10.194839  10.616774  11.028710   \n",
       "\n",
       "                         BEL        MAL  \n",
       "Yr_Mo_Dy Yr_Mo_Dy                        \n",
       "1961     1         13.880968  14.703226  \n",
       "         2         18.583214  15.411786  \n",
       "         3         16.410968  15.720000  \n",
       "         4         11.147333  10.278333  \n",
       "         5         11.900323  12.011613  \n",
       "         6         13.995000  14.553793  \n",
       "         7         11.092581  12.312903  \n",
       "         8         14.410000  14.345333  \n",
       "         9         13.718333  12.921667  \n",
       "         10        14.229355  16.793226  \n",
       "         11        10.776667  12.146000  \n",
       "         12        12.239355  13.098710  \n",
       "1962     1         16.369355  15.661613  \n",
       "         2         16.705357  18.426786  \n",
       "         3          9.690000  11.509000  \n",
       "         4         12.234333  11.780667  \n",
       "         5         12.130000  12.922581  \n",
       "         6         13.757000  15.218333  \n",
       "         7         10.783871  11.326129  \n",
       "         8         13.119032  15.420968  \n",
       "         9         11.483667  12.313333  \n",
       "         10        13.286774  14.090323  \n",
       "         11         9.786667  13.298333  \n",
       "         12        16.043548  20.074516  \n",
       "1963     1         11.428710  18.822258  \n",
       "         2         13.266429  17.120714  \n",
       "         3         13.982903  14.132581  \n",
       "         4         13.875667  16.333667  \n",
       "         5         14.777097  14.975161  \n",
       "         6         12.098000  11.358667  \n",
       "...                      ...        ...  \n",
       "1976     7         10.264194  11.912258  \n",
       "         8          7.079677   9.438387  \n",
       "         9         11.587000  17.634000  \n",
       "         10        11.837742  15.078065  \n",
       "         11        12.568333  15.685333  \n",
       "         12         7.814839  14.346774  \n",
       "1977     1         12.131935  18.830000  \n",
       "         2         11.435357  17.561429  \n",
       "         3         15.863226  19.133548  \n",
       "         4         15.593667  18.274667  \n",
       "         5         10.213548  11.936129  \n",
       "         6         11.321333  11.175333  \n",
       "         7         12.924194  12.186774  \n",
       "         8          9.825161  11.659355  \n",
       "         9         14.051000  17.030333  \n",
       "         10        17.640968  19.842903  \n",
       "         11        17.215333  22.333000  \n",
       "         12        13.237419  19.299677  \n",
       "1978     1         15.101613  20.715806  \n",
       "         2         10.353929  17.298571  \n",
       "         3         14.234194  18.611290  \n",
       "         4         11.190667  14.152000  \n",
       "         5          9.263548  10.756452  \n",
       "         6         11.501000  15.078667  \n",
       "         7         12.648710  14.077419  \n",
       "         8         10.466774  12.054194  \n",
       "         9         15.680333  19.391333  \n",
       "         10        13.776774  17.150000  \n",
       "         11        17.404667  20.723000  \n",
       "         12        13.859677  21.371613  \n",
       "\n",
       "[216 rows x 12 columns]"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.groupby([data.index.year, data.index.month]).mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 步骤12 全国境内平均风速最大的是几月？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Yr_Mo_Dy\n",
       "1     11.790920\n",
       "12    11.599800\n",
       "3     11.296313\n",
       "2     11.257743\n",
       "11    10.811319\n",
       "10    10.422061\n",
       "4     10.419079\n",
       "5      9.767791\n",
       "9      9.437308\n",
       "6      8.980183\n",
       "7      8.570066\n",
       "8      8.434918\n",
       "dtype: float64"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.groupby([data.index.month]).mean().mean(axis=1).sort_values(ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
